<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
class PHPExcel_NamedRange
{
    private $name;
    private $worksheet;
    private $range;
    private $localOnly;
    private $scope;
    public function __construct($pName = NULL, PHPExcel_Worksheet $pWorksheet, $pRange = "A1", $pLocalOnly = false, $pScope = NULL)
    {
        if($pName === NULL || $pWorksheet === NULL || $pRange === NULL) {
            throw new PHPExcel_Exception("Parameters can not be null.");
        }
        $this->name = $pName;
        $this->worksheet = $pWorksheet;
        $this->range = $pRange;
        $this->localOnly = $pLocalOnly;
        $this->scope = $pLocalOnly ? $pScope == NULL ? $pWorksheet : $pScope : NULL;
    }
    public function getName()
    {
        return $this->name;
    }
    public function setName($value = NULL)
    {
        if($value !== NULL) {
            $oldTitle = $this->name;
            if($this->worksheet !== NULL) {
                $this->worksheet->getParent()->removeNamedRange($this->name, $this->worksheet);
            }
            $this->name = $value;
            if($this->worksheet !== NULL) {
                $this->worksheet->getParent()->addNamedRange($this);
            }
            $newTitle = $this->name;
            PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle);
        }
        return $this;
    }
    public function getWorksheet()
    {
        return $this->worksheet;
    }
    public function setWorksheet(PHPExcel_Worksheet $value = NULL)
    {
        if($value !== NULL) {
            $this->worksheet = $value;
        }
        return $this;
    }
    public function getRange()
    {
        return $this->range;
    }
    public function setRange($value = NULL)
    {
        if($value !== NULL) {
            $this->range = $value;
        }
        return $this;
    }
    public function getLocalOnly()
    {
        return $this->localOnly;
    }
    public function setLocalOnly($value = false)
    {
        $this->localOnly = $value;
        $this->scope = $value ? $this->worksheet : NULL;
        return $this;
    }
    public function getScope()
    {
        return $this->scope;
    }
    public function setScope(PHPExcel_Worksheet $value = NULL)
    {
        $this->scope = $value;
        $this->localOnly = $value == NULL ? false : true;
        return $this;
    }
    public static function resolveRange($pNamedRange = "", PHPExcel_Worksheet $pSheet)
    {
        return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet);
    }
    public function __clone()
    {
        $vars = get_object_vars($this);
        foreach ($vars as $key => $value) {
            if(is_object($value)) {
                $this->{$key} = clone $value;
            } else {
                $this->{$key} = $value;
            }
        }
    }
}

?>